package com.jiuyun.dao.impi;

import com.jiuyun.dao.Exam_recordDao;
import com.jiuyun.util.AliPool;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.Connection;
import java.sql.SQLException;

public class Exam_recordDaoImpi  implements Exam_recordDao {
    QueryRunner runner=new QueryRunner();
    @Override
    public int add(int uid, String exam_id, String exam_score, String exam_results) throws SQLException {
        String sql="insert into `exam_record` VALUES(null,?,?,?,null,?);";
        Connection conn= AliPool.getConn();
        int num=runner.update(conn,sql,uid,exam_id,exam_score,exam_results);
        conn.close();
        return num;
    }
}
